home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
addzip
/
utility.frm
< prev
Wrap
Text File
|
1996-05-16
|
2KB
|
76 lines
VERSION 2.00
Begin Form frmUtility
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ClientHeight = 975
ClientLeft = 2490
ClientTop = 3615
ClientWidth = 5175
Height = 1380
Left = 2430
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 975
ScaleWidth = 5175
Top = 3270
Width = 5295
Begin CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 2520
TabIndex = 1
Top = 480
Width = 1215
End
Begin CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 375
Left = 3840
TabIndex = 2
Top = 480
Width = 1215
End
Begin TextBox txtInput
Height = 285
Left = 120
TabIndex = 0
Text = "Text1"
Top = 120
Width = 4935
End
End
Option Explicit
Sub cmdCancel_Click ()
g_cTemp = ""
Unload Me
End Sub
Sub cmdOK_Click ()
Const ATTR_DIRECTORY = 16 ' Declare form constant.
g_cTemp = txtInput.Text
If ((InStr(frmUtility.Caption, "directory") > 0) And (Dir(g_cTemp, ATTR_DIRECTORY) = "")) Then
MsgBox g_cTemp & " is not a directory!", 16, "Error"
Exit Sub
End If
Unload Me
End Sub
Sub Form_Load ()
Dim I As Integer
If (frmQuickZIP.mnuOptionsOnTop.Checked = True) Then
I = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End If
End Sub
Sub txtInput_GotFocus ()
' highlight text when control first gets focus
txtInput.SelStart = 0 ' Start selection at beginning.
txtInput.SelLength = Len(txtInput.Text) ' Length of text in Text1.
End Sub